<?php 

##=============================================================================================

add_action( 'init', 'register_custom_news_event' );
function register_custom_news_event() 
{	

	$labels = array(
	    'name' 					=> _x('News', 'News'),
	    'singular_name' 		=> _x('News', 'News'),
	    'add_new' 				=> _x('Add new', 'News'),
	    'add_new_item' 			=> __('Add new News'),
	    'edit_item' 			=> __('Edit News'),
	    'new_item' 				=> __('new News'),
	    'all_items' 			=> __('All News'),
	    'view_item'				=> __('View News'),
	    'search_items'			=> __('Search News'),
	    'not_found' 			=> __('Not found News'),
	    'not_found_in_trash' 	=> __('Not found News'), 
	    'parent_item_colon' 	=> '',
	    'menu_name' 			=> 'News'
	
	  );
	  $args = array(
	    'labels' 				=> $labels,
	    'public' 				=> true,
	    'publicly_queryable' 	=> true,
	    'show_ui' 				=> true, 
	    'show_in_menu' 			=> true, 
	    'query_var' 			=> true,
	    'rewrite' 				=> true,
	    'capability_type' 		=> 'post',
	    'has_archive' 			=> true, 
	    'hierarchical' 			=> false,
	    'menu_position' 		=> 5,
	  	//'taxonomies'			 => array('category'),
	  	'menu_icon'				=> get_stylesheet_directory_uri().'/admins/images/setting_icon.jpg',  	
	    'supports' 				=> array('title','editor')
	  ); 
	  register_post_type('news-event',$args);
	  ## post_tag for page
	  register_taxonomy_for_object_type('post_tag', 'page');	  	
}

##=============================================================================================

add_action( 'init', 'register_custom_news_service' );
function register_custom_news_service() 
{	

	$labels = array(
	    'name' 					=> _x('Service', 'Service'),
	    'singular_name' 		=> _x('Service', 'Service'),
	    'add_new' 				=> _x('Add new', 'Service'),
	    'add_new_item' 			=> __('Add new Service'),
	    'edit_item' 			=> __('Edit Service'),
	    'new_item' 				=> __('new Service'),
	    'all_items' 			=> __('All Service'),
	    'view_item'				=> __('View Service'),
	    'search_items'			=> __('Search Service'),
	    'not_found' 			=> __('Not found Service'),
	    'not_found_in_trash' 	=> __('Not found Service'), 
	    'parent_item_colon' 	=> '',
	    'menu_name' 			=> 'Service'
	
	  );
	  $args = array(
	    'labels' 				=> $labels,
	    'public' 				=> true,
	    'publicly_queryable' 	=> true,
	    'show_ui' 				=> true, 
	    'show_in_menu' 			=> true, 
	    'query_var' 			=> true,
	    'rewrite' 				=> true,
	    'capability_type' 		=> 'post',
	    'has_archive' 			=> true, 
	    'hierarchical' 			=> false,
	    'menu_position' 		=> 5,
	  	//'taxonomies'			 => array('category'),
	  	'menu_icon'				=> get_stylesheet_directory_uri().'/admins/images/setting_icon.jpg',  	
	    'supports' 				=> array('title','editor')
	  ); 
	  register_post_type('service',$args);
	  ## post_tag for page
	 // register_taxonomy_for_object_type('post_tag', 'page');	  	
}

##=============================================================================================

add_action( 'init', 'register_custom_slideshow' );
function register_custom_slideshow()
{	

	$labels = array(
	    'name' 					=> _x('Slide Show', 'Slide Show'),
	    'singular_name' 		=> _x('Slide Show', 'Slide Show'),
	    'add_new' 				=> _x('Add new', 'Slide Show'),
	    'add_new_item' 			=> __('Add new Slide Show'),
	    'edit_item' 			=> __('Edit Slide Show'),
	    'new_item' 				=> __('New Slide Show'),
	    'all_items' 			=> __('All Slide Show'),
	    'view_item'				=> __('View Slide Show'),
	    'search_items'			=> __('Search Slide Show'),
	    'not_found' 			=> __('Not found Slide Show'),
	    'not_found_in_trash' 	=> __('Not found Slide Show'), 
	    'parent_item_colon' 	=> '',
	    'menu_name' 			=> 'Slide Show'
	
	  );
	  $args = array(
	    'labels' 				=> $labels,
	    'public' 				=> true,
	    'publicly_queryable' 	=> true,
	    'show_ui' 				=> true, 
	    'show_in_menu' 			=> true, 
	    'query_var' 			=> true,
	    'rewrite' 				=> true,
	    'capability_type' 		=> 'post',
	    'has_archive' 			=> true, 
	    'hierarchical' 			=> false,
	    'menu_position' 		=> 5,
	  	//'taxonomies'			 => array('category'),
	  	'menu_icon'				=> get_stylesheet_directory_uri().'/admins/images/setting_icon.jpg',  	
	    'supports' 				=> array('title')
	  ); 
	  register_post_type('slide-show',$args);	
}


##=============================================================================================

add_action( 'init', 'register_custom_hotels' );
function register_custom_hotels()
{	

	$labels = array(
	    'name' 					=> _x('Hotels', 'Hotels'),
	    'singular_name' 		=> _x('Hotels', 'Hotels'),
	    'add_new' 				=> _x('Add new', 'Hotels'),
	    'add_new_item' 			=> __('Add new Hotels'),
	    'edit_item' 			=> __('Edit Hotels'),
	    'new_item' 				=> __('New Hotels'),
	    'all_items' 			=> __('All Hotels'),
	    'view_item'				=> __('View Hotels'),
	    'search_items'			=> __('Search Hotels'),
	    'not_found' 			=> __('Not found Hotels'),
	    'not_found_in_trash' 	=> __('Not found Hotels'), 
	    'parent_item_colon' 	=> '',
	    'menu_name' 			=> 'Hotels'
	
	  );
	  $args = array(
	    'labels' 				=> $labels,
	    'public' 				=> true,
	    'publicly_queryable' 	=> true,
	    'show_ui' 				=> true, 
	    'show_in_menu' 			=> true, 
	    'query_var' 			=> true,
	    'rewrite' 				=> true,
	    'capability_type' 		=> 'post',
	    'has_archive' 			=> true, 
	    'hierarchical' 			=> false,
	    'menu_position' 		=> 5,
	  	//'taxonomies'			 => array('category'),
	  	'menu_icon'				=> get_stylesheet_directory_uri().'/admins/images/setting_icon.jpg',  	
	    'supports' 				=> array('title','editor')
	  ); 
	  register_post_type('hotel',$args);	
}


##=============================================================================================


function my_feed_request($qv) {
	    if (isset($qv['feed']) && !isset($qv['post_type']))
	        $qv['post_type'] = array('post','service');
	    return $qv;
	}
add_filter('request', 'my_feed_request');
?>